package com.hm.shopping.def;

/**
 * @author shishun.wang
 * @date 2018年1月22日 下午2:25:49
 * @version 1.0
 * @describe 商品评论级别
 */
public enum GoodsCommentLevelEnum {

	/**
	 * 好评
	 */
	GOOD("GOOD", "好评"),

	/**
	 * 一般
	 */
	GENERAL("GENERAL", "一般"),

	/**
	 * 差评
	 */
	BAD_REVIEW("BAD_REVIEW", "差评");

	private String status;

	private String desc;

	private GoodsCommentLevelEnum(String status, String desc) {
		this.status = status;
		this.desc = desc;
	}

	public String desc() {
		return this.desc;
	}

	public String status() {
		return this.status;
	}

	public static GoodsCommentLevelEnum trance(String status) {
		for (GoodsCommentLevelEnum statusDef : GoodsCommentLevelEnum.values()) {
			if (statusDef.name().equals(status)) {
				return statusDef;
			}
		}
		return null;
	};
}
